﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace FirstTry.Model
{   
    [DataContract]
    public class User
    {
        [DataMember]
        public int ID { get; set; }

        [DataMember]
        public String fName { get; set; }

        [DataMember]
        public String lName { get; set; }

        [DataMember]
        public String address { get; set; }
        
        [DataMember]
        public int zipCode { get; set; }

        [DataMember]
        public String city { get; set; }

        [DataMember]
        public String licensPlate { get; set; }

        [DataMember]
        public String phoneNumber { get; set; }

        [DataMember]
        public String email { get; set; }

        [DataMember]
        public String userName { get; set; }
        
        [DataMember]
        public String password { get; set; }

        [DataMember]
        public int rank { get; set; }

        public User(int ID, String fName, String lName, String address, int zipCode, String city, String licensPlate, String phoneNumber, String email, String userName, String password, int rank)
        {
            this.ID = ID;
            this.fName = fName;
            this.lName = lName;
            this.address = address;
            this.zipCode = zipCode;
            this.city = city;
            this.licensPlate = licensPlate;
            this.phoneNumber = phoneNumber;
            this.email = email;
            this.userName = userName;
            this.password = password;
            this.rank = rank;
        }

        public User(String fName, String lName, String address, int zipCode, String city, String licensPlate, String phoneNumber, String email, String userName, String password, int rank)
        {
            this.fName = fName;
            this.lName = lName;
            this.address = address;
            this.zipCode = zipCode;
            this.city = city;
            this.licensPlate = licensPlate;
            this.phoneNumber = phoneNumber;
            this.email = email;
            this.userName = userName;
            this.password = password;
            this.rank = rank;
        }

        public User()
        {
        }
        [DataMember]
        string user;
        public string getUser()
        {
            return user;
        }
    }
}
